package com.itheima.pojo;

import jakarta.validation.constraints.NotEmpty;
import jakarta.validation.constraints.NotNull;
import jakarta.validation.groups.Default;
import lombok.Data;

@Data
public class FrontMenus {
    @NotNull(groups = Category.Update.class)
    private Integer id;
    @NotEmpty
    private String name;
    @NotEmpty
    private String path;

    //如果说某个校验项没有指定分组，默认属于Default分组
    //分组之间可以继承，A extends B 那么A中拥有B中所有的校验项
    public interface Add extends Default {

    }
    public interface Update extends Default{

    }
}
